/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.yonsei.iwb.smarttv.gui;

/**
 *
 * @author Joo
 */
public class VisEdge {
    private int id;
    private String name;
    private VisVertex from;
    private VisVertex to;
    
    public VisEdge(int id, String name, VisVertex from, VisVertex to) {
        this.id = id;
        this.name = name;
        this.from = from;
        this.to = to;
    }
    
    public VisVertex getFrom() {
        return this.from;
    }
    
    public VisVertex getTo() {
        return this.to;
    }
    
    public String toString() {
        if(this.name.equals("")){
            return "";
        } else {
            String[] uri = name.split("/");
            String lastUri = uri[uri.length-1];
            return lastUri;
        }
    }
    
}
